gpu: host1x: Fix compiler errors by converting to dma_addr_t
authorEmil Goode <emil.fsw@goode.io>
Wed, 16 May 2018 10:22:04 +0000 (12:22 +0200)
committerBastian Blank <waldi@debian.org>
Mon, 13 Aug 2018 13:33:58 +0000 (14:33 +0100)
commitd83d0b594bf30b1094cfbcb6441405cf02985b9f
tree0e682326979725920fc20a0956cb2c2c80ae4269
parentaff0964daa37572127fa7d9b3164d84e3c7f9e20
gpu: host1x: Fix compiler errors by converting to dma_addr_t

The compiler is complaining with the following errors:

drivers/gpu/host1x/cdma.c:94:48: error:
passing argument 3 of ‘dma_alloc_wc’ from incompatible pointer type
[-Werror=incompatible-pointer-types]

drivers/gpu/host1x/cdma.c:113:48: error:
passing argument 3 of ‘dma_alloc_wc’ from incompatible pointer type
[-Werror=incompatible-pointer-types]

The expected pointer type of the third argument to dma_alloc_wc() is
dma_addr_t but phys_addr_t is passed.

Change the phys member of struct push_buffer to be dma_addr_t so that we
pass the correct type to dma_alloc_wc().
Also check pb->mapped for non-NULL in the destroy function as that is the
right way of checking if dma_alloc_wc() was successful.

Signed-off-by: Emil Goode <emil.fsw@goode.io>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Gbp-Pq: Topic bugfix/arm
Gbp-Pq: Name gpu-host1x-fix-compiler-errors-by-converting-to-dma_.patch
drivers/gpu/host1x/cdma.c
drivers/gpu/host1x/cdma.h